#pragma once
#include "ShapeBuilder.h"
#include "CircleBuilder.h"

#define ARC_CRPE_GUID _T("2341D918-8FFE-43DA-B487-4DFA68C7DAC9")

class TFunction_Logbook; 
class CArcInfo : public CCircleInfo
{
public:
	CArcInfo();
	~CArcInfo();
	virtual void Reset();

	virtual void GetParams(CVarList& varList, UINT nID);
	virtual void SetParams(const CVarList& varList, UINT nID);

	virtual bool GetFromLabel(TDF_Label& label);
	virtual void AddToLabel(TDF_Label& label);
	virtual bool ModifyLabel(TDF_Label& label, TFunction_Logbook& log);

	static bool IsModified(TDF_Label& label, const TFunction_Logbook& log);
//------------------------------------------
	gp_Pnt ptStart;
	gp_Pnt ptEnd;
	Standard_Real dAngle;
//-------------------------------------------
	enum PARAM_INDEX_ARC
	{
		IDX_START = 0,

		CENTER_POINT	= CCircleInfo::CENTER_POINT,
		RADIUS			= CCircleInfo::RADIUS,
		DIRECTION		= CCircleInfo::DIRECTION,
		START_POINT = DIRECTION + 3, // 8
			START_X = START_POINT,   
			START_Y,
			START_Z,
		END_POINT = START_POINT+3,  // 11
			END_X = END_POINT,
			END_Y,
			END_Z,
		ANGLE,						// 14

		IDX_END
	};
};


class CArcBuilder :
	public CShapeBuilder
{
public:
	CArcBuilder(void);
	~CArcBuilder(void);

	virtual bool Build(const CString& szCmdParam, TopoDS_Shape& shape);
	virtual bool Build(CArcInfo* pShapeInfo, TopoDS_Shape& shape);
};
